// Copyright © SixtyFPS GmbH <info@slint-ui.com>
// SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-commercial


global Numbers := {
    property <int> three: 3;
    property <int> ten: three * Numbers.three + 1;
}

export global A := {
    property <int> a_alias <=> a;
    property <int> a: 3;
    property <int> b: a + three;
    property <int> three: Numbers.three;
}

export global B := {
   // property <int> a_alias <=> A.a_alias;
    property <int> c: {
        debug(A.b, Numbers.ten);
        A.b + Numbers.ten;
    }
}

TestCase := Rectangle {
    callback set_a(int);
    set_a(a) => {
        A.a_alias = a;
    }
    property <int> value1: B.c;
    property <bool> test: value1 == 3 + 13;
}

/*
```rust
let instance = TestCase::new().unwrap();
assert_eq!(instance.get_value1(), 3 + 13);
instance.invoke_set_a(4);
assert_eq!(instance.get_value1(), 4 + 13);
```

```cpp
auto handle = TestCase::create();
const TestCase &instance = *handle;
assert_eq(instance.get_value1(), 3 + 13);
instance.invoke_set_a(4);
assert_eq(instance.get_value1(), 4 + 13);
```

```js
let instance = new slint.TestCase({});
assert.equal(instance.value1, 3 + 13);
instance.set_a(4);
assert.equal(instance.value1, 4 + 13);
```

*/
